import * as React from 'react';
import * as ReactDOM from 'react-dom';
import * as Global from '../TS/Global';
import * as MyCss from '../CSS/mycss.css';
import * as MyCfg from './MyCfg';

import { mycfg } from './MyCfg';

export interface TOPProps extends Global.Myprops {
    ttxx?: string
};

interface TOPState { };

export class TOP extends React.Component<TOPProps,
    TOPState> {
    mytest(str: string) {
        console.log("TOP" + str);
    }
    public handleClick(e: React.MouseEvent<any>): void {
        this
            .props
            .OnMessageSendEvent(this, '', "updatetolinux");

    }
    public Logout(): void {


    }
    public render(): JSX.Element {
        return (
            <div className="page-header container-fluid bg-info ">
                <h2>{Global.GetLocal("串口服务器配置")}
                    <small>V1.3</small>
                    {/* <a
                        type="button"
                        data-original-title={Global.GetLocal("注销")}
                        className="btn pull-right  "
                        onClick={e => this.Logout()}>{Global.GetLocal("注销")}</a> */}
                    <a
                        type="button"
                        data-toggle="tooltip"
                        data-placement="top"
                        data-original-title={Global.GetLocal("应用tp")}
                        className="btn btn-success pull-right btn-lg "
                        onClick={e => this.handleClick(e)}><span className="glyphicon glyphicon-ok" />
                        &nbsp;&nbsp;{Global.GetLocal("应用")}</a>

                </h2>

            </div>
        );
    }
}

//export default TOP;